home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-07-29 | 905 b | 28 lines | [TEXT/ttxt] |
- # ToggleSelectionMarker - drop marker/selection intervening text script
-
- # determine the toggle state by searching for a marker called "TogSel"
- Set MarkerOn 0 # initialize
- For Name in `Markers "{Active}"`
- If "{Name}" == TogSel
- Set MarkerOn 1 # signal marker has been dropped
- Break
- End # If
- End # For Name
-
- If {MarkerOn}
- # the start marker has already been dropped.
- # save the current window position
- # drop an end marker at the current insertion point.
- # select the intervening text
- # delete the TogSel marker
- # restore the original window position
- Set SavePos "`FAccess -s "{Active}" ≥≥ Dev:Null`"
- Find §:TogSel "{Active}" ∑∑ Dev:Null
- Unmark TogSel "{Active}" ∑∑ Dev:Null
- ScrollTool -T {SavePos} "{Active}"
- Else # If MarkerOn
- # drop the marker TogSelStart at the current insertion point
- Mark -y § "TogSel" "{Active}" ∑∑ Dev:Null
- End # If MarkerOn
-
- # end of ToggleSelectionMarker